import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule} from 'ionic-angular';
import { HttpModule } from '@angular/http';

//native plugins
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Camera } from '@ionic-native/camera';
import { AppManager } from '../native/app-manager';
import { Launcher } from '../native/launcher';
import { AppShortcut } from '../native/shortcut';
import { StartApp } from '../native/start-app';
import { Loading } from '../components/loading';


//view components
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { IndexPage } from '../pages/index/index.page';
import { PostPage } from '../pages/post/post.page';
import { ListPage } from '../pages/list/list';
import { ShortcutsPage } from '../pages/shortcuts/list';
import { CameraPage } from '../pages/camera/camera';

//service providers
import { PostService } from '../services/post.service';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    IndexPage,
    PostPage,
    ListPage,
    CameraPage,
    ShortcutsPage,
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    HttpModule,
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    IndexPage,
    PostPage,
    HomePage,
    ListPage,
    CameraPage,
    ShortcutsPage,
  ],
  providers: [
    PostService,
    StatusBar,
    SplashScreen,
    AppManager,
    AppShortcut,
    Camera,
    Loading,
    Launcher,
    StartApp,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
